home *** CD-ROM | disk | FTP | other *** search
- ; StarGate v2.1 (June 7, 1999)
- ; Copyright 1999 by Toysoft Development Inc.
- ; All rights reserved.
- ;
- ; http://www.toysoft-dev.com
- ;
- ; Programmed by Danny Y. Wong
- ;
- ; E-Mail: danny@toysoft-dev.com
- ;
- ;-------------------------------------------
- ; Install script by Frank Fenn
- ; Modified by Danny Y. Wong
- ;
- ; http://www.snafu.de/~fenn
-
- ; *** prepare installation ***
-
- (set @app-name "StarGate")
- (set @default-dest "RAM:")
-
- (set #lang_english 0)
-
- ; *** init strings ***
-
- (set #msg_wrongos (cat "You need at least OS 3.1 run "
- @app-name
- )
- )
-
- (set #msg_welcome (cat "Welcome to the StarGate v2.1 installation\n\n"
- "Copyright (c)1999 by Toysoft Develepment Inc.\n"
- "All rights reserved.\n\n"
- "Before Installing StarGate you should quit "
- "StarGate if its running."
-
- )
- )
-
- (set #msg_xxx_dir (cat "Choose StarGate home directory\n"
- "('StarGate' drawer will be created!)"
- )
- )
-
- (set #msg_no_dir (cat "Required assign \'SG:\' not found\n\n"
- "Try to install Stargate first before update :)"
- )
- )
-
- (set #msg_desthelp "Select destination directory for StarGate")
- (set #msg_what "What do you want to install?\n(First install requires all)")
- (set #msg_start "Would you like to start StarGate now?")
- (set #msg_starthelp "Do you want to start StarGate right now?")
- (set #msg_update "Do you want to install or update StarGate?")
- (set #msg_updatehelp "Choose update if you have StarGate already installed")
- (set #part1 "Program files")
- (set #part2 "Documentation (Not included)")
- (set #part3 "MUI classes")
- (set #part4 "Additional tools")
- (set #copy_part1 "Copying program files...")
- (set #copy_part2 "Copying docs...")
- (set #copy_part3 "Copying MUI classes...")
- (set #copy_part4 "Copying tools...")
- (set #msg_yes "Yes")
- (set #msg_no "No")
-
- ; *** checking environment ***
-
- (set os_ver (getversion "exec.library" (resident)))
-
- (if (< os_ver (* 39 65536)) (abort #msg_wrongos))
-
- ; *** print welcome message ***
-
- (welcome #msg_welcome)
-
-
- ; check if StarGate is already installed
-
- (if (exists "SG:" (noreq))
- (
- (set what
- (askbool (prompt #msg_update)
- (help #msg_updatehelp)
- (choices "Install" "Update")
- )
- )
- )
-
- (
-
- ; default to Install
-
- (set what 1)
-
- )
- )
-
-
- (run "avail flush")
-
-
- (if (= what 1)
-
- ; *** install part ***
-
- (
-
- ; *** ask for components to install ***
-
- (if (= 0 @user-level)
- (set install_level %001111)
- (set install_level (askoptions
- (prompt #msg_what)
- (help @askoptions-help)
- (choices #part1 #part2 #part3 #part4)
- )
- )
- )
-
- ; *** ask for destination ***
-
- (set save_user_level @user-level)
- (user 2)
- (set StarGatedest
- (askdir (prompt #msg_xxx_dir)
- (help #msg_desthelp)
- (default @default-dest)
- (disk)
- )
- )
- (set @default-dest (tackon StarGatedest "StarGate"))
- (makedir @default-dest)
- (user save_user_level)
-
- ; *** detect what selected for installation ***
-
- (set copy_part1 (BITAND %000001 install_level))
- (set copy_part2 (BITAND %000010 install_level))
- (set copy_part3 (BITAND %000100 install_level))
- (set copy_part4 (BITAND %001000 install_level))
-
-
- ; *** Users ***
-
- (if copy_part1
- (
- (set new_dest (tackon @default-dest "users"))
-
- (copyfiles (prompt (cat "Copying users..." new_dest))
- (help @copyfiles-help)
- (pattern "#?")
- (source "users")
- (dest new_dest)
- )
- )
- )
-
-
- )
-
- ; *** update part ***
-
- (
- (if (exists "SG:" (noreq))
- (
- (set @default-dest (expandpath "SG:"))
- (set StarGatedest (expandpath "SG:"))
-
- )
- (
- (abort #msg_no_dir)
- )
- )
-
- (set copy_part1 1)
- (set copy_part2 1)
- (set copy_part3 1)
- (set copy_part4 1)
- )
- )
-
- ; *** Main program ***
-
- (if copy_part1
- (
- (copyfiles (prompt (cat #copy_part1 @default-dest))
- (help @copyfiles-help)
- (pattern "StarGate#?")
- (source "")
- (dest @default-dest)
- (confirm)
- )
-
- ; *** extra icons ***
-
- (copyfiles (prompt (cat #copy_part1 StarGatedest))
- (help @copyfiles-help)
- (pattern "#?.info")
- (source "/")
- (dest StarGatedest)
- (confirm)
- )
-
- )
- )
-
- ; *** Images ***
-
- (if copy_part1
- (
- (set new_dest (tackon @default-dest "images"))
-
- (copyfiles (prompt (cat "Copying images..." new_dest))
- (help @copyfiles-help)
- (pattern "#?")
- (source "images")
- (dest new_dest)
- )
- )
- )
-
- ; *** Sounds ***
-
- (if copy_part1
- (
- (set new_dest (tackon @default-dest "sounds"))
-
- (copyfiles (prompt (cat "Copying sounds..." new_dest))
- (help @copyfiles-help)
- (pattern "#?.iff")
- (source "sounds")
- (dest new_dest)
- )
- )
- )
-
-
- ; *** News ***
-
- (if copy_part1
- (
- (set new_dest (tackon @default-dest "News"))
-
- (copyfiles (prompt (cat "Copying News Groups..." new_dest))
- (help @copyfiles-help)
- (pattern "#?")
- (source "News")
- (dest new_dest)
- )
- )
- )
-
- ; *** Pictures ***
-
- (if copy_part1
- (
- (set new_dest (tackon @default-dest "Pictures"))
-
- (copyfiles (prompt (cat "Copying Pictures..." new_dest))
- (help @copyfiles-help)
- (pattern "#?")
- (source "Pictures")
- (dest new_dest)
- )
- )
- )
-
- ; *** MUI classes ***
-
- (if copy_part3
- (
- (set mui_dest "MUI:libs/MUI")
-
- (foreach "MUI" "#?"
- (copylib (prompt (cat #copy_part3 mui_dest))
- (help @copylib-help)
- (source (tackon "MUI" @each-name))
- (dest mui_dest)
- (confirm)
- )
- )
- )
- )
-
- ; *** Additional tools ***
-
- (if copy_part4
- (
- (set c_dest "C:")
-
- (foreach "C" "#?"
- (copylib (prompt (cat #copy_part4 c_dest))
- (help @copylib-help)
- (source (tackon "C" @each-name))
- (dest c_dest)
- (confirm)
- )
- )
-
- (copyfiles (prompt (cat #copy_part1 @default-dest))
- (help @copyfiles-help)
- (pattern "Airmail#?")
- (source "")
- (dest @default-dest)
- (confirm)
- )
-
- (copyfiles (prompt (cat #copy_part1 @default-dest))
- (help @copyfiles-help)
- (pattern "Read#?")
- (source "")
- (dest @default-dest)
- (confirm)
- )
-
- )
- )
-
-
- (makedir (tackon @default-dest "Inbox"))
- (makedir (tackon @default-dest "Files"))
- (makedir (tackon @default-dest "Folders"))
-
- ; *** make user-startup assigns ***
-
- (startup @app-name
- (help "Add system assign to user-startup")
- (prompt "Add system assign to user-startup")
- (confirm)
- (command (cat "Assign SG: " @default-dest))
- )
-
-
- (message "StarGate includes the entire News Group already.\n"
- "You do not have to download a complete new group.\n"
- "When using News you can just subscribe to new groups."
- )
-
- ; *** ask for program start ***
-
- (run "assign SG: " @default-dest)
-
- (set startpgm
- (askbool (prompt #msg_start)
- (help #msg_starthelp)
- (default #msg_no)
- (choices #msg_yes #msg_no)
- )
- )
-
- (if startpgm
- (run "run >NIL:" (tackon @default-dest "StarGate"))
- )
-